#include <iostream>
using namespace std;
int main()
{
	double x, n;
	double temp = 1;
	double result = 1;
	cin >> x >> n;
	while(n)
	{
		temp *= x;
		result += temp;
		n--;
	}
	printf("%.2lf\n", result);
	
	return 0;
} 
